<include file="public@header" />
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a>列表</a></li>
			<li class=""><a href="add">添加</a></li>

		</ul>
		<form class="well form-inline margin-top-20" method="post" action="{:url('goods/index')}">
            价格：
            <input class="form-control" type="text" name="price1" value="{:input('price1')}" style="width: 5%;"> -
            <input class="form-control" type="text" name="price2" value="{:input('price2')}" style="width: 5%;">
            名称：
            <input class="form-control" type="text" name="keyword" value="{:input('keyword')}" placeholder="请输入商品名称">
			分类：
			<select name="cid" id="" class="form-control">
				<volist name="class" id="vo">
					<option value="{$key}" {:input('cid', 0)==$key?'selected':''}>{$vo}</option>
				</volist>
			</select>
			<input type="submit" class="btn btn-primary" value="搜索">
			<a class="btn btn-danger" href="{:url('goods/index')}">清空</a>
		</form>
		<form method="post" class="js-ajax-form" >
			<div class="row">
				<table class="table table-hover table-bordered table-striped table-condensed">
					<thead>
					<tr>
						<th>ID</th>
						<th>名称</th>
						<th>快递公司</th>
						<th>副标题</th>
						<th>封面</th>
						<th>价格</th>
						<th>分类</th>
						<th>库存</th>
						<th>销量</th>
						<th>重量</th>
						<th>库存告警</th>
						<th>上新</th>
						<th>推荐</th>
						<th>首页显示</th>
						<th>状态</th>
						<th>时间</th>
						<th>{:lang('ACTIONS')}</th>
					</tr>
					</thead>
					<tbody>
					<foreach name="list" item="vo">
						<tr>
							<td>{$vo.id}</td>
							<td>{$vo.goods_name}</td>
							<td>{$vo.manage}</td>
							<td>{$vo.goods_subname}</td>
							<td><img src="{:cmf_get_image_url($vo.image)}" style="width:60px;"></td>
							<td>{$vo.goods_price}</td>
							<td>{$vo.class}</td>
							<td>{$vo.goods_num}</td>
							<td>{$vo.goods_sale_num}</td>
							<td>{$vo.weight}</td>
							<td>{$vo.warning_num}</td>
							<td>{$vo.is_new}</td>
							<td>{$vo.is_top}</td>
							<td>{$vo.is_index}</td>
							<td>{$vo.goods_status}</td>
							<td>{:date('Y-m-d H:i',$vo['update_time'])}</td>
							<td>
								<if condition="$vo['goods_status'] eq 0">
									<a class="btn btn-xs btn-info js-ajax-dialog-btn" href="{:url('goods/setstatus',array('id'=>$vo['id'],'status'=>'1'))}">上架</a>
								<elseif condition="$vo['goods_status'] eq 1"/>
									<a class="btn btn-xs btn-danger js-ajax-dialog-btn" href="{:url('goods/setstatus',array('id'=>$vo['id'],'status'=>'0'))}">下架</a>
								</if>

								<a class="btn btn-xs btn-primary" href='{:url("goods/edit",array("id"=>$vo["id"]))}'>{:lang('EDIT')}</a>
								<a class="btn btn-xs btn-danger js-ajax-delete" href="{:url('goods/del',array('id'=>$vo['id']))}">{:lang('DELETE')}</a>
								<a class="btn btn-xs btn-success" href="javascript:openIframeLayer('stock?id={$vo.id}', '{$vo.id}-{$vo.goods_name}-库存修改', {area: ['60%','60%']})">库存</a>
							</td>
						</tr>
					</foreach>
					</tbody>
				</table>
				<div class="pagination">{$list->render()}</div>
			</div>
		</form>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
</body>
</html>